<%@ page contentType="text/html; charset=UTF-8" errorPage="/base/jsp/common/CommonError.jsp"%>
<jsp:directive.page import="com.syzg.base.login.model.LoginObject"/>
<jsp:directive.page import="java.util.List"/>
<jsp:directive.page import="java.util.ArrayList"/>
<jsp:directive.page import="com.syzg.base.merge.model.Module"/>
<%@ include file="/base/jsp/common/Taglibs.jsp"%>
<%@ include file="/base/jsp/common/CustomTheme.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>易臣协同办公软件</title>
<link href="${ctx}/base/css/logo.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />
<script src="${ctx}/base/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/base/js/common/FormFunction.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctx}/base/js/do.js"></script>
<script language="JavaScript">
function openMenuAndContent(leftMenuUrl, rightContentUrl) {
    parent.frames["leftFrame"].location.href = "${ctx}" + leftMenuUrl;
    parent.frames["mainFrame"].location.href = "${ctx}" + rightContentUrl;
}
</script>
</head>
<%
LoginObject loginObject = (LoginObject)session.getAttribute(SysProperties.LOGIN_OBJECT);
String personName = loginObject.getPersonName();
List<Module> moduleList = new ArrayList();

List<Module> allModuleList = null;
if(session.getAttribute(SysProperties.PERSON_MODULE_LIST) != null) {
	allModuleList = (List<Module>)session.getAttribute(SysProperties.PERSON_MODULE_LIST);
}
for(Module module: allModuleList) {
	if(module.getModuleLevel() != null && module.getModuleLevel().longValue() == 1) {
		moduleList.add(module);
	}
}
%>
<body scroll="no">
<form name="form1" method="post" action="">
<!--头部 end-->
<table width="100%" class="head" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="75"><div class="logo"></div></td>
    <td ><div class="logoName"></div></td>
    <td class="head_r">&nbsp;</td>
  </tr>
</table>
<!--头部 end--> 
<!--导航-->
<table width="100%" class="logintit" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="178" valign="top"><div class="userinfo"><span class="name"><%=personName%></span>，您好! </div></td>
    <td valign="top">
    
    <div class="tabsTool"><ul class="tabs">
    <%
    boolean hasOnMenu = false;
    for(Module module: moduleList) {
    	if(!hasOnMenu) {
    	    hasOnMenu = true;
    	    //openMenuAndContent('','')
    %>
            <li class="on"><a href="<%=module.getHref()%>"><%=module.getName()%></a></li>
    <%
    	}else {%>
    	    <li><a href="<%=module.getHref()%>"><%=module.getName()%></a></li>
      <%}
    }%></ul>
        <ul class="rightTool">
          <li class="styHelp"><a href="#">系统帮助</a></li>
          <li class="pw"><a href="javascript:openLink('${ctx}/sys/personPassword!editPassword.action',600,400);">修改密码</a></li>
          <li class="ex"><a href="${ctx}/sys/login!logout.action" target="_top">退出登录</a></li>
        </ul>
      </div>

    </td>
  </tr>
</table>
<!--导航 end-->
<script type="text/javascript">
    Do(function(){
        $('.tabs a').click(function(e){
          e.preventDefault();
          $('.tabs .on').removeClass('on');
          $(this).parent().addClass('on');
        });
    });
	
  </script>
</form>
</body>
</html>
